using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class MouhafazaMap : EntityTypeConfiguration<Mouhafaza>
    {
        public MouhafazaMap()
        {
            // Primary Key
            this.HasKey(t => t.MOH_ID);

            // Properties
            this.Property(t => t.MOH_Name)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Mouhafaza");
            this.Property(t => t.MOH_ID).HasColumnName("MOH_ID");
            this.Property(t => t.MOH_Name).HasColumnName("MOH_Name");
        }
    }
}
